package fr.upmc.cie.data.interfaces;

import java.util.ArrayList;

import fr.upmc.cie.data.TicketItem;
import fr.upmc.cie.data.exception.TicketNotFoundException;

public interface ITicketDataSource {
	
	/**
	 * Inserer un nouveau billet
	 * @param ti
	 */
	public void insert(TicketItem ti);
	
	/**
	 * Supprimer un billet
	 * @param ti
	 * @throws TicketNotFoundException
	 */
	public void delete(TicketItem ti) throws TicketNotFoundException;
	
	/**
	 * Mettre a jour un billet
	 * @param ti
	 * @throws TicketNotFoundException
	 */
	public void update(TicketItem ti) throws TicketNotFoundException;
	
	/**
	 * Renvoie tous les billet
	 * @return
	 */
	public ArrayList<TicketItem> getAllTicket();
	
	/**
	 * Renvoie un billet par rapport a son id
	 * @param id
	 * @return
	 * @throws TicketNotFoundException
	 */
	public TicketItem getTicketById(Long id) throws TicketNotFoundException;
	
	/**
	 * Tester si un billet est deja arichive
	 * @param ti
	 * @return
	 */
	public Long isTicketArchived(TicketItem ti);

}
